<template>
	<view>
		<mc-framework navTitle="MES工控机" @changeLevel="changeLevel">
			<!-- <template #workbench>
					<view style="height: 40px;">
					</view>
				</template> -->
			<!-- 主内容 -->
			<template #content>
				<view class="contentBox">
					123123 是是是
				</view>
			</template> 
		</mc-framework>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		onLoad(onlod) {
			console.log(onlod)
		},
		onBackPress(options) { // 监听页面返回
			if (options.from == 'navigateBack') { // 通过点击路由返回
				return false;
			} else if (options.from == 'backbutton') { // 通过外置返回
				return true;
			}
		},
		methods: {
			changeLevel(data, row) {
				let routes = getCurrentPages(); //当前页面栈
				console.log(routes.length);
				let backIndex = routes.length - row.length; // 计算返回页面栈数
				uni.navigateBack({
					delta: backIndex
				})

			},
		}
	}
</script>

<style lang="scss">

</style>